package com.momo.mapper.mapper;

import com.momo.mapper.dataobject.RoutesDO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 由于需要对分页支持,请直接使用对应的DAO类
 * 注意:此结构有系统生成,禁止手工修改,以免被覆盖,请通过dalgen生成
 * The Table SYS_ROUTES.
 * SYS_ROUTES
 */
public interface RoutesDOMapper{

    /**
     * desc:插入表:SYS_ROUTES.<br/>
     * descSql =  SELECT LAST_INSERT_ID() INSERT INTO sys_routes( URI ,FILTERS ,PREDICATES ,P_ID ,ORDER )VALUES( #{uri,jdbcType=VARCHAR} ,#{filters,jdbcType=VARCHAR} ,#{predicates,jdbcType=VARCHAR} ,#{pId,jdbcType=INTEGER} ,#{order,jdbcType=INTEGER} )
     * @param entity entity
     * @return int
     */
    int insert(RoutesDO entity);
    /**
     * desc:更新表:SYS_ROUTES.<br/>
     * descSql =  UPDATE SYS_ROUTES SET ID = #{id,jdbcType=VARCHAR} ,URI = #{uri,jdbcType=VARCHAR} ,FILTERS = #{filters,jdbcType=VARCHAR} ,PREDICATES = #{predicates,jdbcType=VARCHAR} ,ORDER = #{order,jdbcType=INTEGER} WHERE P_ID = #{pId,jdbcType=INTEGER}
     * @param entity entity
     * @return int
     */
    int update(RoutesDO entity);
    /**
     * desc:根据主键删除数据:SYS_ROUTES.<br/>
     * descSql =  DELETE FROM SYS_ROUTES WHERE P_ID = #{pId,jdbcType=INTEGER}
     * @param pId pId
     * @return int
     */
    int deleteByPId(Integer pId);
    /**
     * desc:根据主键获取数据:SYS_ROUTES.<br/>
     * descSql =  SELECT * FROM sys_routes WHERE P_ID = #{pId,jdbcType=INTEGER}
     * @param pId pId
     * @return RoutesDO
     */
    RoutesDO getByPId(Integer pId);
    /**
     * desc:getRouteAll.<br/>
     * descSql =  SELECT * FROM sys_routes
     * @return List<RoutesDO>
     */
    List<RoutesDO> getRouteAll();
    /**
     * desc:insertSelective.<br/>
     * descSql =  insert into sys_routes p_id, sys_id, sys_predicates, sys_filters, sys_uri, sys_order, sys_name, #{pId,jdbcType=INTEGER}, #{sysId,jdbcType=VARCHAR}, #{sysPredicates,jdbcType=VARCHAR}, #{sysFilters,jdbcType=VARCHAR}, #{sysUri,jdbcType=VARCHAR}, #{sysOrder,jdbcType=INTEGER}, #{sysName,jdbcType=VARCHAR}, 
     * @param entity entity
     * @return int
     */
    int insertSelective(RoutesDO entity);
    /**
     * desc:updateByPrimaryKeySelective.<br/>
     * descSql =  update sys_routes sys_id = #{sysId,jdbcType=VARCHAR}, sys_predicates = #{sysPredicates,jdbcType=VARCHAR}, sys_filters = #{sysFilters,jdbcType=VARCHAR}, sys_uri = #{sysUri,jdbcType=VARCHAR}, sys_order = #{sysOrder,jdbcType=INTEGER}, sys_name = #{sysName,jdbcType=VARCHAR}, where sys_id = #{sysId,jdbcType=VARCHAR}
     * @param entity entity
     * @return int
     */
    int updateByPrimaryKeySelective(RoutesDO entity);
}
